import time

def sort(nums):
    s=True
    while s:
        s=False
        for i in range(len(nums)-1):
            if nums[i] > nums[i+1]:
                nums[i], nums[i+1] = nums[i+1], nums[i]
                s=True
                
f1=open("m1_sorted.txt").readlines()
f2=open('m2_reverse.txt').readlines()
f3=open('m3_shuffle.txt').readlines()

t_start=time.time()
sort(f1)
t_finish=time.time()
print("Время" , round((t_finish - t_start)*1000))
t_start1=time.time()
sort(f1)
t_finish1=time.time()
print("Время" , round((t_finish1 - t_start1)*1000))
t_start2=time.time()
sort(f1)
t_finish2=time.time()
print("Время" , round((t_finish2 - t_start2)*1000))